home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-02 | 2.2 KB | 63 lines | [TEXT/GEOL] |
- Item 0832295 28-Feb-90 09:04
-
- From: DASNET# DASNET, Anna Lange,VCA
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Floating views
-
- TO ANSWER, set "Send to" to: Ravinder.Chandhok@GNOME.CS.CMU.EDU@DASNET#
-
-
- [This message was forwarded from an internet mailing list "macoops" - Rob]
-
- ------- Forwarded Message
-
- Date: Tue, 27 Feb 90 10:35:54 -0500
- From: Brian Patrick Arnold <ba0k+@ANDREW.CMU.EDU>
- To: Macoops <macoops+@ANDREW.CMU.EDU>
- cc:
- Subject: Floating Views
-
-
- Howdy,
-
- if I want a view to be relocated sort of like resizing relSuperView,
- how do I do this correctly using SuperViewChangedSize?
-
- In my current scheme for a vertically floating palette, I force a
- redraw, relocate and call INHERITED SuperViewChangedSize. I ForceRedraw
- first because there seems to be a problem in completely invalidating the
- old extent of the view. I then modify the location and call .Locate.
-
- PROCEDURE TFloatingPalette.SuperViewChangedSize( delta: VPoint;
- invalidate: BOOLEAN );
- OVERRIDE;
- BEGIN
- ForceRedraw;
- fLocation.v := fLocation.v + delta.v;
- Locate( fLocation.h, fLocation.v, kRedraw );
-
- INHERITED SuperViewChangedSize( delta, invalidate );
- END;
-
- It seems to work fine for a palette of buttons in the vertical
- direction. The present problem is in using the same algorithm for a
- horizontally floating TStaticText view (modifying fLocation.h instead of
- fLocation.v) - it keeps clipping itself in the horizontal direction.
- This is most noticable when resizing the superview width smaller than
- the current size by about 8 pixels - the text view moves back 8 pixels
- horizontally but the first 8 horizontal pixels worth of text in the view
- aren't drawn (the rest are) unless I somehow force another redraw. I
- tried adding another ForceRedraw and IF Focus THEN before and after
- calling Locate but that didn't solve the problem. The views in question
- are sizeFixed in both directions. I shouldn't even have to call
- ForceRedraw or Focus to accomplish this task, right?
-
- Ack. Any help much appreciated, thanks a mil. This should be cake.
-
- - - Brian
-
- ------- End of Forwarded Message
-
-